﻿using Company.Database.Entities;

namespace Company.Database
{
    /// <summary>
    /// 操作用户表的接口
    /// </summary>
    public interface IUserRepository  : IRepository<UserEntity>
    {
        /// <summary>
        /// 按用户名搜索用户
        /// </summary>
        /// <param name="username"></param>
        /// <returns></returns>
        UserEntity? Search(string username);
        /// <summary>
        /// 登录用户
        /// </summary>
        /// <param name="username"></param>
        /// <param name="password"></param>
        /// <param name="user"></param>
        /// <returns></returns>
        bool Login(string username, string password, out UserEntity user);    
    }
}
